<?php $form=$this->beginWidget('CActiveForm', array(
        'id'=>'users-login',
        'enableClientValidation' => true,
        'enableAjaxValidation'   => true,
        'clientOptions'          => array(
            'validateOnSubmit' => true,
        ),
        'htmlOptions' => array(
            'role' => 'form'
        )
    )); ?>


    <?php echo $form->textField($model,'username', array('class' => 'input-field form-control user', 'placeholder' => 'Tên đăng nhập')); ?>
    <div class="error"><?php echo $form->error($model,'username'); ?></div>

    <?php echo $form->passwordField($model,'password', array('class' => 'input-field form-control password', 'placeholder' => 'Mật khẩu')); ?>
    <div class="error"><?php echo $form->error($model,'password'); ?></div>

    <div class="checkbox">
        <label>
            <?php echo $form->checkBox($model,'rememberMe'); ?> &nbsp;  Nhớ mật khẩu
        </label>
    </div>

    <?php echo CHtml::submitButton('Đăng nhập', array('class' => 'btn btn-login')); ?>

<?php $this->endWidget(); ?>